<?php if (!defined('THINK_PATH')) exit();?><form id="pagerForm" action="/Admin/Address/index" method="post">
    <input type="hidden" name="pageNum" value="<?php echo ($page['pageNum']); ?>"/>
<input type="hidden" name="numPerPage" value="<?php echo ($page['numPerPage']); ?>" />
    <input type="hidden" name="pid" value="<?php echo ($search['pid']); ?>" />
</form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="/Admin/Address/index" method="post">
    <div class="searchBar">
        <ul class="searchContent"></ul>
        <div class="subBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
            </ul>
        </div>
    </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li>
                <a href="/Admin/Address/add/pid/<?php echo ($pid); ?>" class="add" rel="add" target="navTab"  title="添加">
                    <span>添加</span>
                </a>
            </li>
            <li class="line">line</li>
            <li>
                <a href="/Admin/Address/edit/id/{sid_user}" rel="edit" class="edit" target="navTab" title="编辑">
                    <span>编辑</span>
                </a>
            </li>
            <li class="line">line</li>
            <li>
                <a class="delete" href="/Admin/Address/remove" target="selectedTodo" rel="id" posttype="string" title="你确定要批量删除吗？">
                    <span>删除</span>
                </a>
            </li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="138">
        <thead>
        <tr>
            <th width="2%"><input type="checkbox" group="id" class="checkboxCtrl" ></th>
            <th width="3%">编号</th>
            <th width="30%">名称</th>
            <th width="15%">图片</th>
            <th width="10%">链接</th>
            <th width="10%">创建时间</th>
            <th width="5%">排序</th>
            <th width="5%">发布状态</th>
            <th width="20%">操作</th>
        </tr>
        </thead>
        <tbody>
        <?php if($dataList|count > 0): if(is_array($dataList)): $k = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$volist): $mod = ($k % 2 );++$k;?><tr target="sid_user" rel="<?php echo ($volist['id']); ?>" >
                    <td><input name="id" value="<?php echo ($volist['id']); ?>" type="checkbox"></td>
                    <td><?php echo ( $page['pageNum'] - 1 ) * $page['numPerPage'] + $k;?></td>
                    <td>
                    	<a href="/Admin/Address/edit/id/<?php echo ($volist['id']); ?>" target="navTab" rel="edit" title="<?php echo ($volist['title']); ?>"><?php echo ($volist['title']); ?></a>
                    </td>
                    <td>
                    	<?php if($volist['picture'] == ''): ?>无
						<?php else: ?>
							<a href="<?php echo ($volist['picture']); ?>" title="<?php echo ($volist['title']); ?>" target="_blank" rel="example_group">
								<img src="<?php echo ($volist['picture']); ?>" height="25" alt="<?php echo ($volist['title']); ?>" />
							</a><?php endif; ?>
                    </td>
                    <td>
						<a href="<?php echo ($volist['link']); ?>" title="<?php echo ($volist['title']); ?>" target="_blank"><?php echo ($volist['link']); ?></a>
					</td>
                    <td><?php echo ($volist['create_time']); ?></td>
                    <td><?php echo ($volist['sort']); ?></td>
                    <td>
                    	<?php if($volist['status'] == 1): ?><span style="color:red;" class="span_green" >未发布</span><?php endif; ?>
	                    <?php if($volist['status'] == 0): ?><span style="color:green;" class="span_green" >已发布</span><?php endif; ?>
                    </td>
                    <td></td>
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            <?php else: ?>
        <tr><td colspan="10" style="text-align:center;">没有数据!!!</td></tr><?php endif; ?>
        </tbody>
    </table>
    <div class="panelBar" style="background:none;">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <?php if(is_array($page['numPerPageArray'])): foreach($page['numPerPageArray'] as $key=>$vo): ?><option value="<?php echo ($vo); ?>"<?php if($vo == $page['numPerPage']): ?>selected='selected'<?php endif; ?>><?php echo ($vo); ?></option><?php endforeach; endif; ?>
        </select>
        <span>条，共<?php echo ($page['all']); ?>条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="<?php echo ($page['all']); ?>" numPerPage="<?php echo ($page['numPerPage']); ?>" pageNumShown="10" currentPage="<?php echo ($page['pageNum']); ?>"></div>
</div>
</div>